// pages/user/coin_list.js
import { User } from "../../model/user";
Page({

  /**
   * 页面的初始数据
   */
  data: {
    list: [],
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    wx.showLoading({
      title: '加载中',
    });
    this.getUserCurrencyList();
  },
  /**
   * 获取甜茶币记录
   */
  async getUserCurrencyList() {
    const res = await User.getUserCurrencyList();
    this.setData({
      list: res
    });
    wx.hideLoading();
  }
})